import 'package:flutter/cupertino.dart';

class ZtWantKeepAlive extends StatefulWidget {
  final Widget child;

  ZtWantKeepAlive({required this.child});

  @override
  State<StatefulWidget> createState() {
    return ZtWantKeepAliveState();
  }
}

class ZtWantKeepAliveState extends State<ZtWantKeepAlive>
    with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    super.build(context);
    return widget.child;
  }

  @override
  bool get wantKeepAlive => true;
}
